package com.ssy.bus.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author ssy
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("bus_drug_info")
public class DrugInfo implements Serializable {
    private static final long serialVersionUID = -5409977875563112999L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;

    private String code;

    /**
     * 生产厂家ID
     */
    private Integer production;

    private Integer drugType;

    private Integer preType;

    private String company;

    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal price;

    private Integer inventory;

    private Integer early;

    private String conversion;

    private Integer state;

    @TableField(exist = false)
    private String drugTypeName;

    @TableField(exist = false)
    private String preTypeName;

    @TableField(exist = false)
    private String productionName;

    private Date createTime;

}
